---
id: "raises-decorator"
keywords: ["raises", "decorator"]
name: "@raises"
summary: "This is the `@raises` decorator."
category: "decorators"
status: "deprecated"
---

> Deprecated since v12.0.0. Use the [@throws](./decorator_throws.mdx) decorator instead.

> This decorator requires [`reanalyze`](https://github.com/rescript-lang/reanalyze), a code analysis tool for ReScript, to be installed. [Click here to read about how you get started with reanalyze.](../docs/manual/editor-plugins.mdx#code-analysis).

`@raises` is picked up by reanalyze's exception analysis, and acknowledges that a function can throw exceptions that are not caught, and suppresses a warning in that case. Callers of the functions are then subjected to the same rule. Example `@raises(Exn)` or `@raises([E1, E2, E3])` for multiple exceptions.

### References

- [Reanalyze: Exception Analysis](../docs/manual/editor-plugins.mdx#exception-analysis)
